package com.ch;

import com.ch.service.CxfDemoService;
import com.ch.service.CxfDemoServiceImpl;
import org.apache.cxf.jaxws.JaxWsServerFactoryBean;

/**
 * @author CH
 * @date 2022/3/2
 */
public class ServerRun {
    public static void main(String[] args) {
        CxfDemoServiceImpl implementor = new CxfDemoServiceImpl();
        JaxWsServerFactoryBean svrFactory = new JaxWsServerFactoryBean();
        svrFactory.setServiceClass(CxfDemoService.class);
        svrFactory.setAddress("http://localhost:9000/cxfDemoService");
        svrFactory.setServiceBean(implementor);
        svrFactory.create();
        System.out.println("http://localhost:9000/cxfDemoService?wsdl");
    }
}
